import { postForm } from "@/utils/api";
import { API_ENDPOINTS } from "@/config/api";

/**
 * 用户登录
 * @param {string} username - 用户名
 * @param {string} password - 密码
 * @returns {Promise} 返回包含access_token和token_type的数据
 */
export const login = (username, password) => {
  return postForm(API_ENDPOINTS.AUTH.LOGIN, {
    username,
    password,
  });
};
